package src.math;

public class Var {

	public double x, y;
	public double vx, vy;

	public Var() {
	}

	public Var(double x, double y, double vx, double vy) {
		this.x = x;
		this.y = y;
		this.vx = vx;
		this.vy = vy;
	}

	public static Var add(Var A, Var B) {
		Var Res = new Var();
		Res.x = A.x + B.x;
		Res.y = A.y + B.y;
		Res.vx = A.vx + B.vx;
		Res.vy = A.vy + B.vy;
		return Res;
	}

	public static Var mult(double k, Var A) {
		Var Res = new Var();
		Res.x = k * A.x;
		Res.y = k * A.y;
		Res.vx = k * A.vx;
		Res.vy = k * A.vy;
		return Res;
	}
}
